﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

 
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<!--slider-->
<div class="slider_box">
    <% 
        BIZ.WebInfomationPublishOper ipo = new BIZ.WebInfomationPublishOper();
        int count = 0;
    %> 
	<!--left_ad_big-->
	<div class="w_986">
        <div class="slider_main">
    	<ul class="slider">
        <% 
            IList liLunbo = ipo.getlistweb(1, 6, (int)DAL.webEnums.template.首页_轮播广告);
            count = liLunbo.Count;
            foreach (Hashtable tb in liLunbo)
            {
                if (tb["total"] == null)
                    Response.Write("<li><a target=\"_blank\" href=\"" + (tb["Wi_imageLink"] == null ? "" : tb["Wi_imageLink"].ToString()) + "\"><img src=\"" + BIZ.StringTool.changeImgUrl((tb["Wi_imageUrl"] == null ? "" : tb["Wi_imageUrl"].ToString())) + "\" width=\"986\" height=\"325\" /></a></li>");
            }
        %>
        </ul>
        </div>
        <ul class="num" >
        <% 
            for(int i=0;(i<count-1);i++)
            {
                Response.Write("<li>"+(i+1).ToString()+"</li>");
            }
        %>
        </ul>
    </div>
</div> 
<!--main-->
<div class="main w_980 clearfix">
	<!--left-->
	<div class="main_left clearfix">
    	<!--新闻中心-->
        <div class="news_box">
        	<div class="news_title"><h2>新闻中心</h2><a href="/template/xwzx.html" class="btn_more">更多</a></div>
            <ul>
            <% 
                IList liXw = ipo.getxw();
                foreach (Hashtable tb in liXw)
                {
                    Response.Write("<li><a href=\"/template/xwdetail.html?pid=" + tb["pid"] + "&id=" + tb["Wi_id"] + "\">·" + (tb["Wi_title0"] == null ? "" : tb["Wi_title0"].ToString()) + "</a><span>[" + DateTime.Parse(tb["Wi_addTime"].ToString()).ToString("yyyy-MM-dd") + "]</span></li>");
                }
                %>
            </ul>
        </div>
        <!--课程-->
        <div class="schedule">
        	<a href="/template/jwkc.html?pid=<%=(int)DAL.webEnums.template.嘉沃课程_英语课程 %>" title="英语课程">英语课程</a>
        	<a href="/template/jwkc.html?pid=<%=(int)DAL.webEnums.template.嘉沃课程_特色兴趣课 %>" title="特色兴趣课程">特色兴趣课程</a>
        </div>
        <div class="clear"></div>
        <!--嘉沃之星-->
        <div class="star_box star_people">
        	<div class="star_title"><h2>嘉沃之星</h2><a href="/template/jwzxlist.html?pid=<%=(int)DAL.webEnums.template.学员风采_嘉沃之星 %>" class="btn_more">更多</a></div>
        	<ul>
            <% 
                IList ligg = ipo.getlistweb(1, 3, (int)DAL.webEnums.template.学员风采_嘉沃之星); 
                    foreach (Hashtable tb in ligg)
                    {
                        if (tb["total"] == null)
                        {
                            Response.Write("<li><a target=\"_blank\" href=\"/template/jwzxdetail.html?pid=" + ((int)DAL.webEnums.template.学员风采_嘉沃之星).ToString() + "&id=" + tb["Wi_id"] + "\"><img width=\"175\" height=\"125\" src=\"" + BIZ.StringTool.changeImgUrl((tb["Wi_imageUrl"] == null ? "" : tb["Wi_imageUrl"].ToString())) + "\" /><span>" + (tb["Wi_title0"] == null ? "" : tb["Wi_title0"].ToString()) + "</span></a></li>");
                        }

                    }
            %>
            </ul>
        </div>
        <!--明星家庭-->
        <div class="star_box star_family">
        	<div class="star_title"><h2>明星家庭</h2><a href="/template/mxjtlist.html?pid=<%=(int)DAL.webEnums.template.学员风采_明星家庭 %>" class="btn_more">更多</a></div>
        	<ul>
            <% 
                IList ligg2 = ipo.getlistweb(1, 3, (int)DAL.webEnums.template.学员风采_明星家庭); 
                    foreach (Hashtable tb in ligg2)
                    {
                        if (tb["total"] == null)
                        {
                            Response.Write("<li><a target=\"_blank\" href=\"/template/jwzxdetail.html?pid=" + ((int)DAL.webEnums.template.学员风采_明星家庭).ToString() + "&id=" + tb["Wi_id"] + "\"><img width=\"175\" height=\"125\" src=\"" + BIZ.StringTool.changeImgUrl((tb["Wi_imageUrl"] == null ? "" : tb["Wi_imageUrl"].ToString())) + "\" /><span>" + (tb["Wi_title0"] == null ? "" : tb["Wi_title0"].ToString()) + "</span></a></li>");
                        }
                    }
            %>
            </ul>
        </div>
    </div>
	<!--righr-->
    <div class="main_right">
    	<div class="b"></div>
    	<!--btn-->
        <div class="right_btn_box">
        	<div class="right_btn_main">
                <ul>
                    <li><a href="/template/xxzy.html?pid=<%=(int)DAL.webEnums.template.学习资源_歌曲 %>"><img src="../../images/ico_01.png" width="36" height="36" />歌曲下载</a></li>
                    <li><a href="/template/wztj.html?pid=<%=(int)DAL.webEnums.template.学习资源_网站推荐 %>"><img src="../../images/ico_02.png" width="36" height="36" />网站推荐</a></li>
                    <li><a href="/template/xxzylist.html?pid=<%=(int)DAL.webEnums.template.学习资源_教辅资料 %>"><img src="../../images/ico_03.png" width="36" height="36" />教辅资料</a></li>
                    <li><a href="/template/xxzylist.html?pid=<%=(int)DAL.webEnums.template.学习资源_教育知识分享 %>"><img src="../../images/ico_04.png" width="36" height="36" />教育知识分享</a></li>
                    <li style="padding-left:40px;"><a href="/template/zmxz.html?pid=<%=(int)DAL.webEnums.template.学习资源_嘉沃桌面下载 %>"><img src="../../images/ico_05.png" width="36" height="36" />嘉沃桌面</a></li>
                </ul>
            </div>
        </div>
        <!--联系方式-->
        <% 
            Html.RenderPartial("~/Views/Shared/lxfs.ascx"); 
        %>
    </div>
</div>
 
<script type="text/javascript">
    $(function () {
        var len = $(".num").width();
        var w = 490 - len / 2;
        $(".num").css({ "left": w });
        /*首页大图广告效果*/
        var len = $(".num > li").length;
        var index = 0;
        var adTimer;
        $(".num li").mouseover(function () {
            index = $(".num li").index(this);
            showImg(index);
        }).eq(0).mouseover();
        //滑入 停止动画，滑出开始动画.
        $('.slider_main').hover(function () {
            clearInterval(adTimer);
        }, function () {
            adTimer = setInterval(function () {
                showImg(index)
                index++;
                if (index == len) { index = 0; }
            }, 5000);
        }).trigger("mouseleave");
        // 通过控制top ，来显示不同的幻灯片
        function showImg(index) {
            var adHeight = $(".slider_main").height();
            $(".slider").stop(true, false).animate({ top: -adHeight * index }, 500);
            $(".num li").removeClass("on")
					.eq(index).addClass("on");
        }
    })
</script>
</asp:Content>
